home *** CD-ROM | disk | FTP | other *** search
/ Erotic Games: Memory / Erotic Games: Memory.iso / mac / air_installers / AdobeAIR.exe / setup.swf / scripts / mx / events / ValidationResultEvent.as < prev   
Text File  |  2009-02-12  |  1KB  |  52 lines

  1. package mx.events
  2. {
  3.    import flash.events.Event;
  4.    import mx.core.mx_internal;
  5.    
  6.    use namespace mx_internal;
  7.    
  8.    public class ValidationResultEvent extends Event
  9.    {
  10.       
  11.       public static const INVALID:String = "invalid";
  12.       
  13.       mx_internal static const VERSION:String = "3.0.0.0";
  14.       
  15.       public static const VALID:String = "valid";
  16.        
  17.       
  18.       public var results:Array;
  19.       
  20.       public var field:String;
  21.       
  22.       public function ValidationResultEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:String = null, param5:Array = null)
  23.       {
  24.          super(param1,param2,param3);
  25.          this.field = param4;
  26.          this.results = param5;
  27.       }
  28.       
  29.       public function get message() : String
  30.       {
  31.          var _loc1_:String = "";
  32.          var _loc2_:int = results.length;
  33.          var _loc3_:int = 0;
  34.          while(_loc3_ < _loc2_)
  35.          {
  36.             if(results[_loc3_].isError)
  37.             {
  38.                _loc1_ += _loc1_ == "" ? "" : "\n";
  39.                _loc1_ += results[_loc3_].errorMessage;
  40.             }
  41.             _loc3_++;
  42.          }
  43.          return _loc1_;
  44.       }
  45.       
  46.       override public function clone() : Event
  47.       {
  48.          return new ValidationResultEvent(type,bubbles,cancelable,field,results);
  49.       }
  50.    }
  51. }
  52.